import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询realtest列表
export function listRealtest(query) {
  return request({
    url: '/system/realtest/list',
    method: 'get',
    params: query
  })
}

// 查询realtest详细
export function getRealtest(userId) {
  return request({
    url: '/system/realtest/' + userId,
    method: 'get'
  })
}

// 新增realtest
export function addRealtest(data) {
  return request({
    url: '/system/realtest',
    method: 'post',
    data: data
  })
}

export function changeUserStatus(userId, status) {
  const data = {
    userId,
    status
  }
  return request({
    url: '/system/realtest',
    method: 'put',
    data: data
  })
}

// 修改realtest
export function updateRealtest(data) {
  return request({
    url: '/system/realtest',
    method: 'put',
    data: data
  })
}

// 删除realtest
export function delRealtest(userId) {
  return request({
    url: '/system/realtest/' + userId,
    method: 'delete'
  })
}

// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/system/user/deptTree',
    method: 'get'
  })
}
